<template>
  <div class="home">
    <div class="nav">
      <Button v-for="item in demoNum" :key="item" @click="route(item)">测试用例{{item}}</Button>
    </div>
    <div class="body">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
  export default{
    name: 'app',
    data: () => {
        return {
          demoNum:12,
        }
    },
    methods:{
      route(demoNum){
        this.$router.push(`/demo${demoNum}`);
      }
    }
  }
</script>

<style scoped>
  .home{
    height: 100vh;
    width: 100vw;
  }
  .nav{
    padding: 10px 20px 0;
    height: 50px;
    border-bottom: 1px solid #333;
  }
  .body{
    height: calc(100vh - 50px);
  }
</style>
